Skip to content

User invite system#643

Merged
KavikaPalletenne merged 13 commits intoCHAOS-224-KHAOS-rewritefrom
CHAOS-613-user-invite-system
Jan 15, 2026
Merged

User invite system#643
KavikaPalletenne merged 13 commits intoCHAOS-224-KHAOS-rewritefrom
CHAOS-613-user-invite-system

Conversation

@peternuyn
Copy link

what i have done:

  • Implement a new table organisation_invites, to store invites.
  • model and handler for invites api (GET & POST invite only), modify organisation.rs, so it now also uses invites.rs in the logic.
  • UI for invite page + error log, if not added successfully.

To test:

  1. have an email with admin access ready. Logined.
  2. open a new private browser to represent new user that get invited.
  3. On the admin side, Click member, and add member. You put down the email you want to invite. Click okay, if error, the invite box will tell you reason why.
  4. Now open CHaos DB and do "select * from organisation_invites", MAKE SURE YOU SEE AN INVITE, if the adding was successful. THere will be an invite code, copy that code and paste it in your url. for example:
    To see the invite page:
    http://localhost:3000/en/dashboard/invite/7c1fbfcde -> replace "7c1fbfcde" with your invite code you have in DB. This will open up an invite page, you can now accept it, if account not created, then u have to create one. IF browser is currently have an CHaos account, but different email, user. You will not allowed to accept anyway.

Peter Nguyen and others added 6 commits December 19, 2025 18:15
- Updated the organisation model to include ChaosEmail for sending invitations.
- Added TODOs for future invite code generation and summary of related UI.

let invite;
try {
invite = await getInvite(inviteId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use react-query and prefetchQuery

setMessage(null);
try {
if (!mockMode) {
await acceptInvite(code);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove try catch blocks and mockMoode

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert change for this whole file

@peternuyn peternuyn changed the title feature/CHAOS-613-invite-user-system CHAOS-613-invite-user-system Jan 14, 2026
Base automatically changed from CHAOS-598-nextjs to CHAOS-571-integrate-be-fe January 14, 2026 11:26
Base automatically changed from CHAOS-571-integrate-be-fe to CHAOS-224-KHAOS-rewrite January 14, 2026 11:32
@KavikaPalletenne KavikaPalletenne changed the title CHAOS-613-invite-user-system User invite system Jan 15, 2026
@KavikaPalletenne KavikaPalletenne merged commit 2a62f78 into CHAOS-224-KHAOS-rewrite Jan 15, 2026
5 checks passed
@KavikaPalletenne KavikaPalletenne deleted the CHAOS-613-user-invite-system branch January 15, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants